getTextCharacterInkBoxes

abstract fun getTextCharacterInkBoxes(block: DesignBlock, from: Int = -1, to: Int = -1): List<CharacterInkBox>

Returns the tight ink-paint bounding box of each grapheme in the given range. Required scope: "text/character"

Each entry corresponds to one grapheme cluster in [from, to). Non-printable graphemes (newlines, zero-width joiners, etc.) yield a zero-rect with the correct baselineY. All coordinates are in global scene space (Y-down).

Return

one CharacterInkBox per grapheme cluster in the requested range.

Parameters

block

the text block to query.

from

the start index of the UTF-16 range to query. If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected range. If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.

to

the index after the last character of the range to query. If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected range. If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.